package com.restcloud.pojo.Public;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class Addr {

    public Addr(){}

    public Addr(String use){
        this.use = use;
    }

    public Addr(String name, Value telecom) {
        this.name = name;
        this.telecom = telecom;
    }

    @XmlAttribute(name = "use")
    private String use;

    @XmlElement(name = "houseNumber")
    private String houseNumber;

    @XmlElement(name = "streetName")
    private String streetName;

    @XmlElement(name = "township")
    private String township;

    @XmlElement(name = "county")
    private String county;

    @XmlElement(name = "city")
    private String city;

    @XmlElement(name = "state")
    private String state;

    @XmlElement(name = "postalCode")
    private String postalCode;

    @XmlElement(name = "name")
    private String name;

    @XmlElement(name = "telecom")
    private Value telecom;

    @XmlElement(name = "occupationCode")
    private Code occupationCode;

}
